<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title></title>
</head>
<body>
	<script type="text/javascript">
		var timeout = 5000
		
		var timeId = setInterval(function() {
			var timeNow = new Date(timeout)
			timeout-= 1000
			if (timeout<0) clearInterval(timeId)
			console.log(timeNow.getSeconds())
		}, 1000)
		
	</script>
	
</body>
</html>